package com.bsy.framework.task

import com.bsy.framework.helper.AppHelper
import com.bsy.framework.manager.AppManager
import com.bsy.stater.task.Task

/**
 * Created by Sincerity on 2024/3/5.
 * Copyright
 * 描述：
 */
class AppManagerTask : Task() {
    //异步线程执行的Task在被调用await的时候等待
    override fun needWait(): Boolean {
        return true
    }

    //依赖某些任务，在某些任务完成后才能执行
    override fun dependsOn(): MutableList<Class<out Task>> {
        val tasks = mutableListOf<Class<out Task?>>()
        tasks.add(APPHelperTask::class.java)
        return tasks
    }

    override fun run() {
        AppManager.init(AppHelper.getApplication())
    }
}